import {
	Api
} from '@/common/api'
import {
	ApiBase
} from '@/common/api-base.js';

class formClass extends ApiBase {
    
    listCustomerForm(query){
        return Api.get(`${this._namespace}/VisitFormLog/list`,query);
    }
    listFormCont(query){
        return Api.get(`${this._namespace}/question/list/all`,query);
    }
	currencyFormId(query) {
		return Api.get(`${this._namespace}/form/currency`,query);
	}
	addFormAnswer(type,data) {
		return Api.post(`${this._namespace}/VisitFormLog/h5/${Number(type)}`,data );
	}
	updateAnswer(type,data) {
		return Api.put(`${this._namespace}/VisitFormLog/h5/${Number(type)}`,data );
	}
	getQuestionnaireCommon(visitId) {
		return Api.get(`${this._namespace}/consultation/disease/questionnaireCommon/h5/${visitId}` );
	}
	detailFormAndAnswer(visitLogId) {
		return Api.get(`${this._namespace}/VisitFormLog/h5/${visitLogId}` );
	}
	
}

export const formApi = new formClass('/system')
